/**
 * email
 */
function testEmail(obj) {
	var err = '';
	var yForm = new YPostForm(['host', 'port', 'username', 'password', 'sender_email', 'sender_name', 'postto', 'content']);
	var str = yForm.serialize();
	
	if(yForm.getData('host') == '') {
		err += '邮箱服务器不能为空';
	}
	if(yForm.getData('port') == '') {
		err += '端口不能为空';
	}
	if(yForm.getData('username') == '') {
		err += '用户名不能为空';
	}
	if(yForm.getData('password') == '') {
		err += '密码不能为空';
	}
	if(yForm.getData('sender_email') == '') {
		err += '显示邮箱名不能为空';
	}
	if(yForm.getData('sender_name') == '') {
		err += '显示发送者email不能为空';
	}
	if(yForm.getData('postto') == '') {
		err += '测试接收者email不能为空';
	}
	if(yForm.getData('content') == '') {
		err += '内容不能为空';
	}
	
	if('' != err) {
		alert(err);
	} else {
		obj.disabled = true;
		jQuery.post(U('Setting/ajax_testEmail'), str, function(r){
			alert('已发送');
			obj.disabled = false;
		});
	}
}